/*
 * @Author: your name
 * @Date: 2020-07-29 18:13:43
 * @LastEditTime: 2020-08-05 17:01:32
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \dcg-vue-init\src\router\modules\user.js
 */
import layout from '@/layout'
const userRouter = {
  path: '/user',
  component: layout,
  redirect: '/user/list',
  name: '用户模块',
  meta: {
    title: 'user',
    icon: 'user'
  },
  children: [
    {
      path: 'list',
      component: () => import('@/views/user/list'),
      name: '用户列表',
      meta: { title: '用户列表', roles: ['admin'] }
    },
    {
      path: 'edit',
      component: () => import('@/views/user/edit'),
      name: '编辑用户',
      meta: { title: 'edit user' }
    },
    {
      path: 'delete',
      component: () => import('@/views/user/delete'),
      name: '删除用户',
      meta: { title: 'add user', roles: ['editor'] }
    },
    {
      path: 'add',
      component: () => import('@/views/user/add'),
      name: '添加用户',
      meta: { title: '添加用户' }
    }
  ]
}
export default userRouter
